// src/main/services/db-init.service.ts
import { Injectable } from '@nestjs/common'
import { LogService } from '@main/services/log.service'

@Injectable()
export class DbInitService {
  constructor(private readonly logService: LogService) {}

  async initialize(): Promise<void> {
    try {
      await import('../db') // 假设 ./db 是初始化脚本
      this.logService.info('数据库初始化完成')
    } catch (err) {
      this.logService.error('数据库初始化失败:', err)
    }
  }
}
